<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>金字塔</title>
	</head>
	<style type="text/css">
		div{
			text-align:center;
			line-height: 25px;
		}	
	</style>
	<script type="text/javascript">
			function	study(){
				var t=prompt("输入一个数：","");		
					for (var k=t;k>0;k--) {					
							document.write("<hr width="+k*10+"px />");										
					}
					for (var n=1;n<=t;n++) {						
							document.write("<hr width="+n*10+"px/>");											
					}	
			}
			</script>
		
	<body>
		<div >
		<input type="button" name="JZT" id="JZT" value="金字塔" onclick="study()"/>
			
		</div>
	</body>
</html>
